[IA64] remove xenia64_init.c
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 6 Jun 2006 15:06:19 +0000 (09:06 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 6 Jun 2006 15:06:19 +0000 (09:06 -0600)
Relocate the few bits left to ia64 specific parts of the tree.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
linux-2.6-xen-sparse/arch/ia64/kernel/setup.c
linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre
linux-2.6-xen-sparse/arch/ia64/xen/drivers/coreMakefile
linux-2.6-xen-sparse/arch/ia64/xen/drivers/xenia64_init.c [deleted file]
linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c
linux-2.6-xen-sparse/arch/ia64/xen/util.c

index 0cd53ed8dbf8cc9c2caff70c7dda1f27be5c4407..171d29b4038b03d78cb49378fca158b0142100f1 100644 (file)
@@ -519,14 +519,18 @@ setup_arch (char **cmdline_p)
        }
 #ifdef CONFIG_XEN
        if (is_running_on_xen()) {
-               extern shared_info_t *HYPERVISOR_shared_info;
-               extern int xen_init (void);
+               shared_info_t *s = HYPERVISOR_shared_info;
 
-               xen_init ();
+               xen_start_info = __va(s->arch.start_info_pfn << PAGE_SHIFT);
+               xen_start_info->flags = s->arch.flags;
+
+               printk("Running on Xen! start_info_pfn=0x%lx nr_pages=%ld "
+                      "flags=0x%x\n", s->arch.start_info_pfn,
+                      xen_start_info->nr_pages, xen_start_info->flags);
 
                /* xen_start_info isn't setup yet, get the flags manually */
-               if (HYPERVISOR_shared_info->arch.flags & SIF_INITDOMAIN) {
-                       if (!(HYPERVISOR_shared_info->arch.flags & SIF_PRIVILEGED))
+               if (s->arch.flags & SIF_INITDOMAIN) {
+                       if (!(s->arch.flags & SIF_PRIVILEGED))
                                panic("Xen granted us console access "
                                      "but not privileged status");
                } else {
index a7b9302ab87c8ea7787043f8ff4ded19ddfc7e39..a6d80acbbfa3057d23b5f1c9b8a01c2e1c3a93bc 100755 (executable)
@@ -16,9 +16,6 @@ ln -sf ../../../../xen/include/asm-ia64/asm-xsi-offsets.h include/asm-ia64/xen/
 ln -sf ../../arch/ia64/xen/drivers/Makefile drivers/xen/Makefile
 ln -sf ../../../arch/ia64/xen/drivers/coreMakefile drivers/xen/core/Makefile
 
-#not sure where these ia64-specific files will end up in the future
-ln -sf ../../../arch/ia64/xen/drivers/xenia64_init.c drivers/xen/core
-
 #still a few x86-ism's in various drivers/xen files, patch them
 #cd drivers/xen
 #if [ ! -e ia64.patch.semaphore ]
index f396542b4410b74755e31d2439b66a9234ddd76e..7f89b8ea693f9a6ad77ef15a5f77ad2cc7df2b7b 100644 (file)
@@ -7,7 +7,6 @@ obj-$(CONFIG_PROC_FS) += xen_proc.o
 
 ifeq ($(ARCH),ia64)
 obj-y   += evtchn.o
-obj-y   += xenia64_init.o
 ifeq ($(CONFIG_XEN_IA64_DOM0_VP),y)
 obj-$(CONFIG_NET)     += skbuff.o
 endif
diff --git a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/xenia64_init.c b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/xenia64_init.c
deleted file mode 100644 (file)
index 4833a4f..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifdef __ia64__
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/efi.h>
-#include <asm/sal.h>
-#include <asm/hypervisor.h>
-/* #include <asm-xen/evtchn.h> */
-#include <xen/interface/arch-ia64.h>
-#include <linux/vmalloc.h>
-
-shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)XSI_BASE;
-EXPORT_SYMBOL(HYPERVISOR_shared_info);
-
-start_info_t *xen_start_info;
-
-int running_on_xen;
-EXPORT_SYMBOL(running_on_xen);
-
-int xen_init(void)
-{
-       static int initialized;
-       shared_info_t *s = HYPERVISOR_shared_info;
-
-       if (initialized)
-               return running_on_xen ? 0 : -1;
-
-       if (!is_running_on_xen())
-               return -1;
-
-       xen_start_info = __va(s->arch.start_info_pfn << PAGE_SHIFT);
-       xen_start_info->flags = s->arch.flags;
-       printk("Running on Xen! start_info_pfn=0x%lx nr_pages=%ld flags=0x%x\n",
-               s->arch.start_info_pfn, xen_start_info->nr_pages,
-               xen_start_info->flags);
-
-       initialized = 1;
-       return 0;
-}
-
-#ifndef CONFIG_XEN_IA64_DOM0_VP
-/* We just need a range of legal va here, though finally identity
- * mapped one is instead used for gnttab mapping.
- */
-unsigned long alloc_empty_foreign_map_page_range(unsigned long pages)
-{
-       struct vm_struct *vma;
-
-       if ( (vma = get_vm_area(PAGE_SIZE * pages, VM_ALLOC)) == NULL )
-               return NULL;
-
-       return (unsigned long)vma->addr;
-}
-#endif
-
-#if 0
-/* These should be define'd but some drivers use them without
- * a convenient arch include */
-unsigned long mfn_to_pfn(unsigned long mfn) { return mfn; }
-#endif
-#endif
index 7fe01feb80d8b98df61574231b8b4a486808136b..58e30466a378c43f2e10504104c55e86726d3b8b 100644 (file)
@@ -23,6 +23,7 @@
 //#include <linux/kernel.h>
 #include <linux/spinlock.h>
 #include <linux/bootmem.h>
+#include <linux/module.h>
 #include <linux/vmalloc.h>
 #include <asm/page.h>
 #include <asm/hypervisor.h>
 #include <xen/interface/memory.h>
 #include <xen/balloon.h>
 
+shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)XSI_BASE;
+EXPORT_SYMBOL(HYPERVISOR_shared_info);
+
+start_info_t *xen_start_info;
+
+int running_on_xen;
+EXPORT_SYMBOL(running_on_xen);
+
 //XXX xen/ia64 copy_from_guest() is broken.
 //    This is a temporal work around until it is fixed.
 //    used by balloon.c netfront.c
index 5bc074a9adfc6072cf48eea66955db5b1176c3b5..f305e89989c67fc103026571a729f630ffb9d2b2 100644 (file)
@@ -104,6 +104,21 @@ void unlock_vm_area(struct vm_struct *area)
 }
 EXPORT_SYMBOL_GPL(unlock_vm_area);
 
+#ifndef CONFIG_XEN_IA64_DOM0_VP
+/* We just need a range of legal va here, though finally identity
+ * mapped one is instead used for gnttab mapping.
+ */
+unsigned long alloc_empty_foreign_map_page_range(unsigned long pages)
+{
+       struct vm_struct *vma;
+
+       if ( (vma = get_vm_area(PAGE_SIZE * pages, VM_ALLOC)) == NULL )
+               return NULL;
+
+       return (unsigned long)vma->addr;
+}
+#endif
+
 /*
  * Local variables:
  *  c-file-style: "linux"